﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GBL.Repository.Resources;

namespace GBlasonLogic.Rules
{
    public class DivisionPoints : Dictionary<DivisionType, List<Points>>
    {
        private static DivisionPoints _singleton;
        public static DivisionPoints Singleton
        {
            get { return _singleton ?? (_singleton = new DivisionPoints()); }
        }

        public static List<Points> FromType(DivisionType type)
        {
            return Singleton[type];
        }

        private DivisionPoints()
        {
            Add(DivisionType.PartyPlain, new List<Points> { Points.None });
            Add(DivisionType.PartyFess, new List<Points> { Points.FessTop, Points.FessBottom });
            Add(DivisionType.PartyPale, new List<Points> { Points.PaleLeft, Points.PaleRight });
            Add(DivisionType.PartyBend, new List<Points> { Points.BendTop, Points.BendBottom });
            Add(DivisionType.PartyBendSinister, new List<Points> { Points.BendSinisterTop, Points.BendSinisterBottom });
            Add(DivisionType.PartySaltire, new List<Points> { Points.SaltireTop, Points.SaltireLeft, Points.SaltireBottom, Points.SaltireRight });
            
        }
    }
}
